<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    var foo = 'windowFoo'
    const obj = {
        foo: 'objFoo',
        getName: function () {
            // console.log(this, 'line 14')
            console.log(this.foo)
        }
    }
    obj.getName()   // objFoo
    obj.getName.call(null)  // windowFoo    传入 null 相当于传入 window
    obj.getName.call(undefined)  // windowFoo
    obj.getName.call(false)     // undefined
</script>

</body>
</html>
